#include "stdio.h"
#include "stdlib.h"

int isPrime(int);

int main()
{
    int n;

    scanf("%d", &n);

    if (isPrime(n))
    {
        printf("%d is prime\n", n);
    }
    else
    {
        printf("%d is not prime\n", n);
    }

    return 0;
}


int isPrime(int n)
{
    int divisor;

    // numbers less than 2 is not prime
    if (n <= 1)
    {
        return 0;
    }
    
    // check from 2 up to sqrt(n), i.e., divisor * divisor <= n
    for(divisor = 2; divisor * divisor <= n; divisor ++)
    {
        // is not prime if divisible
        if (n % divisor == 0)
        {
            return 0;
        }
    }
    return 1;
}
